home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assemblers / cas.lha / notes < prev    next >
Encoding:
Text File  |  1992-08-12  |  3.1 KB  |  87 lines

  1. START-UP NOTES
  2. (1) If you use semi-colons for comments, make sure you precede the comments
  3.     by at least 2 consecutive semi-colons.  Usually, this should amount to
  4.     nothing more than performing a substitution ; -> ;; with your editor.
  5.  
  6.     A short program (semi.c) has been provided that will do the same.
  7.  
  8. (2) If you are using an 8051 extension (like the 8052 or 8051fa), you will
  9.     have to make an include file to define the special function registers and
  10.     bits and values for that processor.  Example include files have been
  11.     provided: 8052.h and 8051fa.h.
  12.  
  13. (3) The software in the data directory has been provided as an illustration
  14.     of modular programming using this assembler.
  15.  
  16. (4) About the 8051 source in the rest of the archive:
  17.    Most of the 8051 assembly software and documentation preceded the assembler
  18. provided with this package, therefore the files are not completely modular.
  19. The one exception is the source contained in assem/data, which is a modularized
  20. version of the source in the data directory.  There is a corresponding makefile
  21. for assem/data in that directory.
  22.  
  23.    To assemble all the other sources:
  24.  
  25.         crc.asm   in the crc directory
  26.         data.asm  in the data directory
  27.         debug.asm in the debug directory
  28.         drive.asm in the drive directory
  29.         lcd.asm   in the kernel directory
  30.         int.asm   in the kernel directory
  31.  
  32. just run the assembler on the file indicated, for instance:
  33.  
  34.                        cas crc.asm
  35.  
  36. to assemble crc.asm.  All the other assembly language modules have names ending
  37. in .lib, and are combined with the source module (crc.asm in the example above)
  38. using the assembler's file inclusion feature.
  39.  
  40. (5) If your source file was written for another non-minimal assembler, make
  41.     sure your directives are converted to conform to this assembler.  For
  42.     reference, the directives accepted by this assembler are:
  43.  
  44. include "FILE"             --- File inclusion
  45.  
  46. seg Type                   --- Setting current segment and/or location
  47. seg Type at Loc                Type = code, xdata, or data.
  48. seg Type org Loc
  49. at Loc
  50. org Loc
  51.  
  52. LABEL equ Val              --- Defining new labels
  53. LABEL Type Val                 Type = code, xdata, data, sfr, or bit.
  54. LABEL:
  55. LABEL set Val
  56. LABEL = Val
  57.  
  58. <digit>:                   --- Defining and using numeric labels
  59. <digit>f
  60. <digit>b
  61.  
  62. global LABEL equ Val        --- Declaring global labels.
  63. global LABEL Type Val
  64. global LABEL
  65. public LABEL equ Val
  66. public LABEL Type Val
  67. public LABEL
  68.  
  69. extern equ LABEL, ..., LABEL  --- Declaring external labels
  70. extern Type LABEL,..., LABEL      Type = code, xfata, data, sfr, or bit
  71.  
  72. ds Val                       --- Memory allocation
  73. rb Val
  74. rw Val
  75.  
  76. db Val, ..., Val              --- Memory formatting. db/byte can accept strings
  77. byte Val, ..., Val
  78. dw Val, ..., Val
  79. word Val, ..., Val
  80.  
  81. if (Val) <Statement>                    --- Conditional assembly
  82. if (Val) <Statement> else <Statement>
  83.  
  84. { <Statement> ... <Statement> }         --- Statement grouping
  85.  
  86. <Statement>; <Statement>                --- Multiple statements on a line.
  87.